package com.macro.admin.service;

import com.macro.admin.pojo.Admin;
import com.baomidou.mybatisplus.extension.service.IService;
import com.macro.admin.pojo.AdminLoginParam;
import com.macro.admin.pojo.RespBean;
import com.macro.admin.pojo.Role;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 用户信息表 服务类
 * </p>
 *
 * @author Xiao Hai
 * @since 2021-04-19
 */
public interface AdminService extends IService<Admin> {

    /**
     * 登录之后返token
     * @param username
     * @param password
     * @param code
     * @param phone
     * @param smsCode
     * @param request
     * @return
     */
    RespBean login(String username,String password,String code,String phone,String smsCode, HttpServletRequest request);

    /**
     * 获取当前登录用户信息
     * @param userName
     * @return
     */
    Admin getAdminByUserName(String userName);

    /**
     * 根据用户id查询角色
     * @param adminId 用户id
     * @return
     */
    List<Role> getRoles(Integer adminId);
}
